import { Component, OnInit} from '@angular/core';
import { Location } from '@angular/common';
import { ViewChild , ElementRef , AfterViewInit } from '@angular/core';

@Component({
  selector: 'app-babbar',
  templateUrl: './tabbar.component.html',
  styleUrls: ['./tabbar.component.scss']
})


export class TabbarComponent implements OnInit, AfterViewInit {
  @ViewChild('pl', {static: false}) pla: any;
  // public pngUrl = [
  //
  //   {
  //     url: '../../assets/ui/homeoff.png'
  //   }, {
  //     url: '../../assets/ui/shopoff.png'
  //   }, {
  //     url: '../../assets/ui/privateoff.png'
  //   }
  //
  // ]
  public pngUrl = '../../assets/ui/homeoff.png'
  public ShopUrl = '../../assets/ui/shopoff.png'
  public PreUrl = '../../assets/ui/preoff.png'
  public count1 = 0;

  public pUrl = location.pathname;
  constructor() {

    console.log(location.pathname);

  }

  ngOnInit() {

  }

  ngAfterViewInit() {
    console.log(this.pla.nativeElement);
  }
  // ChageHome() {
  //   this.count1 ++;
  //   if (this.count1 % 2 === 1) {
  //     console.log(11);
  //     this.pngUrl = '../../assets/ui/homeoff.png';
  //   } else {
  //     this.pngUrl = '../../assets/ui/homeon.png';
  //   }
  // }
  // ChageCart() {
  //   this.count1 ++;
  //   if (this.count1 % 2 === 1) {
  //     console.log(11);
  //     this.ShopUrl = '../../assets/ui/shopoff.png';
  //   } else {
  //     this.ShopUrl = '../../assets/ui/shopon.png';
  //   }
  // }
  // ChagePrivate() {
  //   this.count1 ++;
  //   if (this.count1 % 2 === 1) {
  //     console.log(11);
  //     this.PreUrl = '../../assets/ui/privateoff.png';
  //   } else {
  //     this.PreUrl = '../../assets/ui/privateon.png';
  //   }
  // }

}
